Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sundry fixes #747

Merged
merged 2 commits into from
Jul 17, 2024
Merged

Sundry fixes #747

merged 2 commits into from
Jul 17, 2024

Conversation

mruwnik
Copy link
Collaborator

@mruwnik mruwnik commented Jul 16, 2024

e.g.

requests.get(
    'https://aistampy.info/questions/allQuestions',
    auth=HTTPBasicAuth('stampy', 'stampy'),
    params={'dataType': 'singleFileJson', 'questions': 'inProgress'}
).json()

searchFn(query)
setShowResults(true)
}
// Properly adding all dependancies would require transforming `searchFn` into a callback
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from phone, but something like:

const searchFnRef = useRef(searchFn)
searchFnRef.current = searchFn
useEffect(
...searchFnRef.current(),
...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dunno if that's better... :D

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabling the eslint rule is unsafe for future changes which can more easily introduce bugs.. mutable refs might not look good, but you explicitly say "this is not a dependency which triggers a synchronization, I just want to use whatever value is has currently" without implying anything about any other variable that may or may not be a dependency

@@ -25,4 +25,4 @@ MATOMO_DOMAIN = "{MATOMO_DOMAIN}"
DISCORD_LOGGING_CHANNEL_ID = "{DISCORD_LOGGING_CHANNEL_ID}"
DISCORD_LOGGING_TOKEN = "{DISCORD_LOGGING_TOKEN}"
EDITOR_USERNAME = "{EDITOR_USERNAME}"
EDITOR_PASSWORD = "{EDITOR_PASSWORD}"
EDITOR_PASSWORD = "{EDITOR_PASSWORD}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, why removing it?

Copy link
Collaborator

@LeMurphant LeMurphant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about the code, but the format to request the pages looks good.

@mruwnik mruwnik merged commit 387886b into master Jul 17, 2024
1 check passed
@mruwnik mruwnik deleted the sundry-fixes branch July 17, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants